<?php if(!defined('DB_NAME')) die()?>
<?php get_header()?>
<?php
//判断是否手机
if( !get('ini_mark') && ismobile() && $obj_key==$ini_key ){
	include "mp/archive.php";
}
else {
//判断是否媒体分类
$media = explode( ',', get('ini_media_id') );
if( get('ini_media') && !get('ini_mark') && is_category() && ( in_category($media) || in_des_cat($media) ) ){
	include "inc/media.php";
}
//输出正常文章
elseif ( function_exists('themedie') ) {
?>
	<div id="content">
		<div class="main">
			<div class="hide"><?php ini_map()?></div>
			<span class="archive-title">分类：<?php single_cat_title()?><a class="icon-rss" href="<?php $category = get_category( get_query_var('cat') ); echo get_category_feed_link( $category->cat_ID ) ?>" rel="external"></a></span>
<?php if (get('ini_ad1')) echo "<div class='ad1'>".get('ini_ad1_code')."</div>\n"?> 
<?php
if( have_posts() ):
	while ( have_posts() ): the_post();
?>
			<article class="post-item clear">
				<?php get_img(300,160)?>
				<h2><?php ini_title()?></h2>
				<div class="post-info"><?php if( get('ini_rate') ) fancyratings(); echo '<span><i class="icon-time"></i>&nbsp;<time datetime="' .get_the_time('Y-m-d'). '">' .get_the_time('Y-m-d'). '</time></span><span><i class="icon-eye-open"></i>&nbsp;' .get_post_views($post->ID). ' ℃</span>'; echo edit_post_link('编辑文章', '<span><i class="icon-edit"></i>&nbsp;', '</span>')?></div>
				<div class="post-entry"<?php if ( get('ini_no_thumb') ) echo ' style=padding-bottom:28px'?>><?php ini_excerpt(200)?></div>
<?php ini_tags()?> 
			</article>
<?php
	endwhile;
endif;
?>
<?php wp_reset_query()?>
<?php if( get('ini_ad2') ) echo "			<div class='ad2'>".get('ini_ad2_code')."</div>\n"?> 
			<div style=margin-top:20px></div><?php pagination( $query_string, $posts_per_page)?>
		</div>
	</div>
<?php get_sidebar()?>
<?php }
}?>
<?php get_footer()?>